package com.zxq.exchange.service;

import com.zxq.exchange.task.DeviceInitiateTask;
import com.zxq.exchange.task.PlatformInitiateTask;

import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 模块功能在这里启动
 */
@Deprecated
public class ExchangeService {


    static ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(4);
    /**
     * 服务开始
     */
    public static void start() {
        DeviceInitiateTask deviceInitiateTask = new DeviceInitiateTask();
        PlatformInitiateTask platformInitiateTask = new PlatformInitiateTask();
        scheduledThreadPoolExecutor.scheduleAtFixedRate(deviceInitiateTask,0,1, TimeUnit.MILLISECONDS);
        scheduledThreadPoolExecutor.scheduleAtFixedRate(platformInitiateTask,0,1, TimeUnit.MILLISECONDS);
    }

}
